package chan.project.config;

import com.baidubce.qianfan.Qianfan;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@ConfigurationProperties(prefix = "baidu.qianfan")
@Data
public class AiConfig {

    private String accessKey;

    private String secretKey;

    @Bean
    public Qianfan getWenXinBean(){
        Qianfan qianfan = new Qianfan(accessKey,secretKey);
        return qianfan;
    }
}